/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package r2x;

/**
 *
 * @author przemek
 */
public class ColumnInfo {

    private String name;
    private Boolean requesite;
    private Boolean inPrimKey;

    private static String yesString = "YES";
    private static String noString = "NO";

    ColumnInfo(){
        name = "";
        inPrimKey = false;
        requesite = true;
    }

    ColumnInfo(String name, String req) {
        this();
        this.name = name;
        if (req.equals(yesString))
            this.requesite = false;
    }

    @Override
    public String toString(){
        String resultString = ""+name+"          not null: "+requesite
                +"     in primary key: "+inPrimKey +"\n";
        return resultString;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the requesite
     */
    public Boolean getRequesite() {
        return requesite;
    }

    /**
     * @param requesite the requesite to set
     */
    public void setRequesite(Boolean requesite) {
        this.requesite = requesite;
    }

    /**
     * @return the inPrimKey
     */
    public Boolean getInPrimKey() {
        return inPrimKey;
    }

    /**
     * @param inPrimKey the inPrimKey to set
     */
    public void setInPrimKey(Boolean inPrimKey) {
        this.inPrimKey = inPrimKey;
    }
}
